home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / graphics / displayinfo.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  7KB  |  217 lines

  1. #ifndef    GRAPHICS_DISPLAYINFO_H
  2. #define    GRAPHICS_DISPLAYINFO_H
  3. /*
  4. **    $Filename: graphics/displayinfo.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 37.3 $
  7. **    $Date: 91/01/14 $
  8. **
  9. **    include define file for displayinfo database
  10. **
  11. **    (C) Copyright 1985,1986,1987,1988,1989 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef EXEC_TYPES_H
  16. #include <exec/types.h>
  17. #endif /* EXEC_TYPES_H */
  18.  
  19. #ifndef GRAPHICS_GFX_H
  20. #include <graphics/gfx.h>
  21. #endif /* GRAPHICS_GFX_H */
  22.  
  23. #ifndef GRAPHICS_MONITOR_H
  24. #include <graphics/monitor.h>
  25. #endif /* GRAPHICS_MONITOR_H */
  26.  
  27. #ifndef UTILITY_TAGITEM_H
  28. #include <utility/tagitem.h>
  29. #endif /* UTILITY_TAGITEM_H */
  30.  
  31. /* the "public" handle to a DisplayInfoRecord */
  32.  
  33. typedef APTR DisplayInfoHandle;
  34.  
  35. /* datachunk type identifiers */
  36.  
  37. #define DTAG_DISP        0x80000000
  38. #define DTAG_DIMS        0x80001000
  39. #define DTAG_MNTR        0x80002000
  40. #define DTAG_NAME        0x80003000
  41.  
  42. struct QueryHeader
  43. {
  44.     ULONG    StructID;    /* datachunk type identifier */
  45.     ULONG    DisplayID;    /* copy of display record key    */
  46.     ULONG    SkipID;        /* TAG_SKIP -- see tagitems.h */
  47.     ULONG    Length;        /* length of local data in double-longwords */
  48. };
  49.  
  50. struct DisplayInfo
  51. {
  52.     struct    QueryHeader Header;
  53.     UWORD    NotAvailable;    /* if NULL available, else see defines */
  54.     ULONG    PropertyFlags;    /* Properties of this mode see defines */
  55.     Point    Resolution;    /* ticks-per-pixel X/Y               */
  56.     UWORD    PixelSpeed;    /* aproximation in nanoseconds           */
  57.     UWORD    NumStdSprites;    /* number of standard amiga sprites    */
  58.     UWORD    PaletteRange;    /* distinguishable shades available    */
  59.     Point    SpriteResolution; /* std sprite ticks-per-pixel X/Y    */
  60.     UBYTE    pad[4];
  61.     ULONG    reserved[2];    /* terminator */
  62. };
  63.  
  64. /* availability */
  65.  
  66. #define DI_AVAIL_NOCHIPS    0x0001
  67. #define DI_AVAIL_NOMONITOR    0x0002
  68. #define DI_AVAIL_NOTWITHGENLOCK 0x0004
  69.  
  70. /* mode properties */
  71.  
  72. #define DIPF_IS_LACE        0x00000001
  73. #define DIPF_IS_DUALPF        0x00000002
  74. #define DIPF_IS_PF2PRI        0x00000004
  75. #define DIPF_IS_HAM        0x00000008
  76.  
  77. #define DIPF_IS_ECS        0x00000010    /*    note: ECS modes (SHIRES, VGA, and **
  78.                                             **    PRODUCTIVITY) do not support      **
  79.                                             **    attached sprites.          **
  80.                                             */
  81. #define DIPF_IS_PAL        0x00000020
  82. #define DIPF_IS_SPRITES    0x00000040
  83. #define DIPF_IS_GENLOCK    0x00000080
  84.  
  85. #define DIPF_IS_WB        0x00000100
  86. #define DIPF_IS_DRAGGABLE    0x00000200
  87. #define DIPF_IS_PANELLED    0x00000400
  88. #define DIPF_IS_BEAMSYNC    0x00000800
  89.  
  90. #define DIPF_IS_EXTRAHALFBRITE    0x00001000
  91.  
  92. struct DimensionInfo
  93. {
  94.     struct    QueryHeader Header;
  95.     UWORD    MaxDepth;          /* log2( max number of colors ) */
  96.     UWORD    MinRasterWidth;       /* minimum width in pixels      */
  97.     UWORD    MinRasterHeight;      /* minimum height in pixels     */
  98.     UWORD    MaxRasterWidth;       /* maximum width in pixels      */
  99.     UWORD    MaxRasterHeight;      /* maximum height in pixels     */
  100.     struct    Rectangle   Nominal;  /* "standard" dimensions          */
  101.     struct    Rectangle   MaxOScan; /* fixed, hardware dependant    */
  102.     struct    Rectangle VideoOScan; /* fixed, hardware dependant    */
  103.     struct    Rectangle   TxtOScan; /* editable via preferences     */
  104.     struct    Rectangle   StdOScan; /* editable via preferences     */
  105.     UBYTE    pad[14];
  106.     ULONG    reserved[2];          /* terminator */
  107. };
  108.  
  109. struct MonitorInfo
  110. {
  111.     struct    QueryHeader Header;
  112.     struct    MonitorSpec  *Mspc;   /* pointer to monitor specification  */
  113.     Point    ViewPosition;          /* editable via preferences       */
  114.     Point    ViewResolution;       /* standard monitor ticks-per-pixel  */
  115.     struct    Rectangle ViewPositionRange;  /* fixed, hardware dependant */
  116.     UWORD    TotalRows;          /* display height in scanlines       */
  117.     UWORD    TotalColorClocks;     /* scanline width in 280 ns units    */
  118.     UWORD    MinRow;          /* absolute minimum active scanline  */
  119.     WORD    Compatibility;          /* how this coexists with others       */
  120.     UBYTE    pad[36];
  121.     ULONG    reserved[2];          /* terminator */
  122. };
  123.  
  124. /* monitor compatibility */
  125.  
  126. #define MCOMPAT_MIXED    0    /* can share display with other MCOMPAT_MIXED */
  127. #define MCOMPAT_SELF    1    /* can share only within same monitor */
  128. #define MCOMPAT_NOBODY -1    /* only one viewport at a time */
  129.  
  130. #define DISPLAYNAMELEN 32
  131.  
  132. struct NameInfo
  133. {
  134.     struct    QueryHeader Header;
  135.     UBYTE    Name[DISPLAYNAMELEN];
  136.     ULONG    reserved[2];          /* terminator */
  137. };
  138.  
  139. /* DisplayInfoRecord identifiers */
  140.  
  141. #define INVALID_ID        ~0
  142.  
  143. /* normal identifiers */
  144.  
  145. #define MONITOR_ID_MASK        0xFFFF1000
  146.  
  147. #define DEFAULT_MONITOR_ID        0x00000000
  148. #define NTSC_MONITOR_ID        0x00011000
  149. #define PAL_MONITOR_ID            0x00021000
  150.  
  151. /* the following 20 composite keys are for Modes on the default Monitor */
  152. /* ntsc & pal "flavors" of these particular keys may be made by or'ing    */
  153. /* the ntsc or pal MONITOR_ID with the desired MODE_KEY... */
  154.  
  155. #define LORES_KEY            0x00000000
  156. #define HIRES_KEY            0x00008000
  157. #define SUPER_KEY            0x00008020
  158. #define HAM_KEY            0x00000800
  159. #define LORESLACE_KEY            0x00000004
  160. #define HIRESLACE_KEY            0x00008004
  161. #define SUPERLACE_KEY            0x00008024
  162. #define HAMLACE_KEY            0x00000804
  163. #define LORESDPF_KEY            0x00000400
  164. #define HIRESDPF_KEY            0x00008400
  165. #define SUPERDPF_KEY            0x00008420
  166. #define LORESLACEDPF_KEY        0x00000404
  167. #define HIRESLACEDPF_KEY        0x00008404
  168. #define SUPERLACEDPF_KEY        0x00008424
  169. #define LORESDPF2_KEY            0x00000440
  170. #define HIRESDPF2_KEY            0x00008440
  171. #define SUPERDPF2_KEY            0x00008460
  172. #define LORESLACEDPF2_KEY        0x00000444
  173. #define HIRESLACEDPF2_KEY        0x00008444
  174. #define SUPERLACEDPF2_KEY        0x00008464
  175. #define EXTRAHALFBRITE_KEY        0x00000080
  176. #define EXTRAHALFBRITELACE_KEY        0x00000084
  177.  
  178. /* vga identifiers */
  179.  
  180. #define VGA_MONITOR_ID            0x00031000
  181.  
  182. #define VGAEXTRALORES_KEY        0x00031004
  183. #define VGALORES_KEY            0x00039004
  184. #define VGAPRODUCT_KEY            0x00039024
  185. #define VGAHAM_KEY            0x00031804
  186. #define VGAEXTRALORESLACE_KEY        0x00031005
  187. #define VGALORESLACE_KEY        0x00039005
  188. #define VGAPRODUCTLACE_KEY        0x00039025
  189. #define VGAHAMLACE_KEY            0x00031805
  190. #define VGAEXTRALORESDPF_KEY        0x00031404
  191. #define VGALORESDPF_KEY        0x00039404
  192. #define VGAPRODUCTDPF_KEY        0x00039424
  193. #define VGAEXTRALORESLACEDPF_KEY    0x00031405
  194. #define VGALORESLACEDPF_KEY        0x00039405
  195. #define VGAPRODUCTLACEDPF_KEY        0x00039425
  196. #define VGAEXTRALORESDPF2_KEY        0x00031444
  197. #define VGALORESDPF2_KEY        0x00039444
  198. #define VGAPRODUCTDPF2_KEY        0x00039464
  199. #define VGAEXTRALORESLACEDPF2_KEY    0x00031445
  200. #define VGALORESLACEDPF2_KEY        0x00039445
  201. #define VGAPRODUCTLACEDPF2_KEY        0x00039465
  202. #define VGAEXTRAHALFBRITE_KEY        0x00031084
  203. #define VGAEXTRAHALFBRITELACE_KEY    0x00031085
  204.  
  205. /* a2024 identifiers */
  206.  
  207. #define A2024_MONITOR_ID        0x00041000
  208.  
  209. #define A2024TENHERTZ_KEY        0x00041000
  210. #define A2024FIFTEENHERTZ_KEY        0x00049000
  211.  
  212. /* prototype identifiers */
  213.  
  214. #define PROTO_MONITOR_ID        0x00051000
  215.  
  216. #endif    /* GRAPHICS_DISPLAYINFO_H */
  217.